<%@ page import="com.tianxiabuyi.utils.ErrcodeUtil" %>
<%@ page import="com.tianxiabuyi.utils.LabelUtil" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/validate.jsp"%>
<%
    // 根据标签id请求成员信息
    msg.put("data", Collections.EMPTY_MAP);
    Integer labelId = input.getInt("label_id", -1);
    if (labelId == -1) {
        ErrcodeUtil.setErrcode(msg, ErrcodeUtil.NO_RESULT);
        Tools.encryptPrint(out, msg);
        return;
    }
    Integer type = input.getInt("type", 0);
    Map<String, List<Map>> memberMap = LabelUtil.getLabelMember(hospital, labelId, type);
    if (memberMap == null || memberMap.isEmpty()) {
        ErrcodeUtil.setErrcode(msg, ErrcodeUtil.NO_RESULT);
    } else {
        msg.put("data", memberMap);
    }
    Tools.encryptPrint(out, msg);
%>
